<? 
	$title="User List"; 
	$pageid="4";
	$accessid=",a10,";

	if(isset($_POST['btnsubmit']))
	{
		require("required/dbconnect.php");
		$bank_name=$_POST['bank_name'];
		$acc_name=$_POST['acc_name'];
		$acc_no=$_POST['acc_no'];
		$billing_email=$_POST['billing_email'];
		
		$update=mysql_query("update os_bankacc set bank_name='$bank_name',acc_name='$acc_name',acc_no='$acc_no',billing_email='$billing_email' where id=1");
		
		
		header("Location:bankinfo.php?msg=1");
	}
	require("required/dbconnect.php"); 
	require("required/function.php");
	require("required/header.php");
	
	checkAccess("allow_content_management",1);
	if(empty($_GET['msg']))
	{
		$msg="";
	}
	else
	{
		$msg="<img src='images/icons/tick.jpg' align='absmiddle'> <font color=green>Data updated!</font>";
	}
	
	
	$get_info=mysql_query("select * from os_bankacc where id=1");
	
	$a=mysql_fetch_array($get_info,MYSQL_ASSOC);
	
	
?>
<table width="100%"  cellpadding="0" cellspacing="5" height="300">
<tr>

	<td valign="top">
			<?= $msg ?>
			<form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
			<table width="100%" >
				<td width="30%" class="title"><strong>Contact Details</strong></td>
				<tr>
					<td>Bank Name</td><td width="70%"><input type="text" value="<?= $a['bank_name'] ?>" name="bank_name" maxlength="100" size="30"></td>
				</tr>
				<tr>
					<td>Company name</td><td width="70%"><input type="text" value="<?= $a['acc_name'] ?>" name="acc_name" maxlength="150" size="20"></td>
				</tr>
				<tr>
					<td>Account Number</td><td width="70%"><input type="text" value="<?= $a['acc_no'] ?>" name="acc_no" maxlength="30" size="20"></td>
				</tr>
				<tr>
					<td>Email that receiving documents</td><td width="70%"><input type="text" value="<?= $a['billing_email'] ?>" name="billing_email" maxlength="30" size="20"></td>
				</tr>
				
				<td width="30%">
					
					<input type="submit" value="Save" class="button" name="btnsubmit">
				</td>
			</table>
			</form>
		</td>
	</tr>
	
	
</table>
<? require("required/footer.php"); ?>

